<%--
  Created by IntelliJ IDEA.
  User: 19373
  Date: 2022/3/1
  Time: 14:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>--%>
<html>
<head>
    <title>Title</title>
</head>
<body>
<table>
    <!-- 循环输出商品信息 -->
    <c:forEach items="${requestScope.products}" var="product"
               varStatus="status">
        <!-- 如果是偶数行，为该行换背景颜色 -->
        <tr <c:if test="${status.index % 2 == 1 }">
            style="background-color:rgb(219,241,212);"</c:if>>
            <td>${product.name }</td>
            <td>${product.area }</td>
            <td>${product.price }</td>
        </tr>
    </c:forEach>
</table>

</body>
</html>
